const path = require('path');
const resolve = dir => path.join(__dirname, dir)
module.exports = {
    chainWebpack: config => {
        // 设置文件别名，便于组件寻找相应的文件,比如@就代表src路径，这样一来避免了../../../这种写法
        config.resolve.alias
            .set('@', resolve('src'))
            .set('assets', resolve('@/assets'))
            .set('components', resolve('@/components'))
            .set('network', resolve('@/network'))
            .set('views', resolve('@/views'));
    }
}